import { createSelector } from '@ngrx/store';

import { MapState } from '../reducers';
import { getMapState } from './map.selector';
import { ZoomState } from '../reducers/zoom.reducer';

const getZoomState = createSelector(getMapState, (state: MapState) => state.zoom);
const getZoomIncrement = createSelector(getZoomState, (state: ZoomState) => state.increment);
const getZoomDecrement = createSelector(getZoomState, (state: ZoomState) => state.decrement);

export const zoomSelector = {
    getZoomState,
    getZoomIncrement,
    getZoomDecrement
};